package utilities.config;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class reader 
{
	Properties config;
	
	public reader()
	{
		config = new Properties();
	}
	
	public boolean load(String file)
	{
		File res = new File(file);
		
		if (res.exists())
		{
			try {
				InputStream in = res.toURI().toURL().openConnection().getInputStream();
				config.load(in);
				in.close();
			} catch (IOException e) { return false; }
			
			return true;
		} else
			return false;
	}
	
	public String getProperty(String key)
	{
		return config.getProperty(key);
	}
}
